package com.boatAnchorAssistant.pojo.entity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import javax.persistence.Table;

/**
 * 【描 述】：
 * 【环 境】：J2SE 17
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2024/4/29 新建
 * @since 2024/4/29
 */
@Data
@Table
@AccEntity(value = "角色",type = EntityType.SERVICE_ENTITY)
@TableComment("角色")
public class Role extends DomainBaseEntity<Role> {

    /**
     * 角色名称
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            length = 20,
            comment = "角色名称",
            isNull = false,
            defaultValue = "")
    private String name;

    /**
     * 所属部门
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            length = 20,
            comment = "所属部门",
            isNull = false,
            defaultValue = "0")
    private Long departmentId;


    /**
     * 所属企业
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            length = 20,
            comment = "所属企业",
            isNull = false,
            defaultValue = "0")
    private Long tenantId;


    /**
     * 备注
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "备注",
            isNull = false,
            defaultValue = "")
    private String remark;


    /**
     * 是否为系统级
     */
    @Column(type = MySqlTypeConstant.BIT,
            length = 1,
            comment = "是否为系统级",
            isNull = false,
            defaultValue = "0")
    private Boolean isSystem;

    /**
     * 是否为管理员角色
     */
    @Column(type = MySqlTypeConstant.BIT,
            length = 1,
            comment = "是否为系统级",
            isNull = false,
            defaultValue = "0")
    private Boolean isAdmin;
}
